package org.tea.springdata.jpa.domain;

import java.io.Serializable;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.TableGenerator;

/**
 * @Author: 张廷
 * @Description: 类描述
 * @Date: 2012-6-29
 * @Time: 上午11:39:25
 */
@MappedSuperclass
public class IdGenerator implements Serializable {
	private static final long serialVersionUID = 4198290545713465581L;

	private Long id;

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "PK_GEN")
	@TableGenerator(name = "PK_GEN", table = "spring_data_tb_gen", pkColumnName = "SEQUENCE_NAME", valueColumnName = "SEQUENCE_VALUE", pkColumnValue = "id", allocationSize = 1, initialValue = 20121220)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}
